<?php
$this->breadcrumbs = array(
	'Admin'=>array('index'),
    'Job',
);
include("left.php");

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$.fn.yiiGridView.update('person-date-grid', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1><?=$title?></h1>

<p>
    You may optionally enter a comparison operator (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b>
    or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.
</p>
<?php
$columns = array(
    'pdid' => array(
        'name' => 'pdid',
        'header' => 'ID',
        'headerHtmlOptions' => array('width' => '6%'),
        'htmlOptions' => array('style' => 'text-align:center;')
    ),
    'job' => array(
        'name' => 'job',
        'header' => 'Job',
        'headerHtmlOptions' => array('width' => '18%'),
    ),
    'uid' => array(
        'name' => 'uid',
        'header' => '用户ID',
        'headerHtmlOptions' => array('width' => '8%'),
        'htmlOptions' => array('style' => 'text-align:center;')
    ),
    'username' => array(
        'name' => 'user.username',
        'header' => '用户',
        'headerHtmlOptions' => array('width' => '8%'),
        'htmlOptions' => array('style' => 'text-align:center;')
    ),
    'office' => array(
        'name' => 'user.office',
        'header' => 'Office',
        'headerHtmlOptions' => array('width' => '10%'),
        'htmlOptions' => array('style' => 'text-align:center;')
    ),
    'type' => array(
        'name' => 'type',
        'header' => 'Periodic',
        'headerHtmlOptions' => array('width' => '10%'),
        'htmlOptions' => array('style' => 'text-align:center;')
    ),
    'time' => array(
        'name' => 'time',
        'header' => 'Job开始时间',
        'headerHtmlOptions' => array('width' => '15%'),
        'htmlOptions' => array('style' => 'text-align:center;')
    ),
    'style' => array(
        'name' => 'style',
        'header' => '时间类型',
        'headerHtmlOptions' => array('width' => '10%'),
        'htmlOptions' => array('style' => 'text-align:center;')
    ),
    array(
        'class' => 'CLinkColumn',
        'header' => '操作', //显示表名称
        'headerHtmlOptions' => array('width'=>'10%'),
        'labelExpression' => '详情', //显示名称
        'urlExpression' => 'Yii::app()->createUrl("personDate/view",array("id"=>$data->pdid))', //显示URL
        'linkHtmlOptions' => array('target' => '_blank'),
        'htmlOptions' => array('style'=>'text-align:center;'),
    ),
);
$this->widget('zii.widgets.grid.CGridView', array(
    'id' => 'person-date-grid',
    'dataProvider' => $model->adminSearch(),
    'filter' => $model,
    'columns' => $columns,
));
?>